package com.wd.tw.domain.dto.response;

import lombok.Data;
import java.util.List;

/**
 * @className: SocketEventResponse
 * @description: TODO 类描述
 * @author: liumingkun
 * @date: 2024/11/21
 **/

@Data
public class SocketEventResponse {

    private Basic basic;
    private DataWrapper data;

    @Data
    public static class Basic {
        private String ver;
        private int code;
        private String msg;
        private long time;
    }

    @Data
    public static class DataWrapper {
        private EventDetect event_detect;

        @Data
        public static class EventDetect {
            private int channel_id;
            private String channel_name;
            private long detect_time;
            private String scene_pic;
            private List<DetectListItem> detect_list;

            @Data
            public static class DetectListItem {
                private String detect_pic;
                private EventInfo event_info;

                @Data
                public static class EventInfo {
                    private String event_type;
                    private TargetInfo target_info;
                    private String event_status;
                    private EventRule event_rule;

                    @Data
                    public static class TargetInfo {
                        private String target_type;
                        private long target_id;
                        private int quality_score;
                        private TargetRect target_rect;
                        private Attribute attribute;

                        @Data
                        public static class TargetRect {
                            private int x;
                            private int y;
                            private int width;
                            private int height;
                        }

                        @Data
                        public static class Attribute {
                            private List<String> common_attribute;
                        }
                    }

                    @Data
                    public static class EventRule {
                        private List<RegionEventDetect> region_event_detect;

                        @Data
                        public static class RegionEventDetect {
                            private int id;
                            private RegionCoordinate region_coordinate;

                            @Data
                            public static class RegionCoordinate {
                                private List<Point> point;

                                @Data
                                public static class Point {
                                    private int x;
                                    private int y;
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
